from typing import ClassVar

from pydantic import BaseSettings


class Settings(BaseSettings):
    DRIVER: ClassVar[str] = 'postgresql+asyncpg'
    USERNAME: ClassVar[str] = 'admin'
    PASSWORD: ClassVar[str] = 'password'
    HOST: ClassVar[str] = '127.0.0.1'
    PORT: ClassVar[str] = 5432
    DATABASE: ClassVar[str] = 'app_db'

    SQLALCHEMY_DATABASE_URL: ClassVar[
        str
    ] = f'{DRIVER}://{USERNAME}:{PASSWORD}@{HOST}:{PORT}/{DATABASE}'

    class Config:
        env_file = '.env'


settings = Settings()
